/**
 * Created by allan on 21/12/2017.
 */

var ws;

$(function () {
    ws = new SockJS(socketUri);
    ws.onopen = function () {
        console.info("Info: connection opened");
    };
    ws.onmessage = function (event) {
        console.info("message:" + event.data);
        notifyHandler.receive();
    };
});

var notifyHandler = {
    connect: function (uri) {
        ws = new SockJS(socketUri);
    },
    receive: function () {
        hot.notifier(event.data);
    }
};